package br.ucb.cm.main.common;

import java.awt.Cursor;

import br.ucb.cm.board.ui.BoardPane;
import br.ucb.cm.main.common.GeneralConstants.PlayerEnum;
import br.ucb.cm.main.mainview.ComputerThread;
import br.ucb.cm.main.mainview.GameController;

public class ComputerController extends PlayerController{

	public ComputerController(GameController gameController, BoardPane boardPane, PlayerEnum player) {
		super(gameController, boardPane, player);
		setCanUseBoard(false);
	}

	@Override
	public Object doAction(ActionEnum action) {
		Object object = super.doAction(action);

		return object;
	}

	@Override
	public void useAsController() {
		super.useAsController();
		
		boardPane.setCursor(new Cursor(Cursor.WAIT_CURSOR));
		Thread thread = new Thread(new ComputerThread(boardPane, player, this));
		thread.start();
	}

}
